Class sjl.Pair
All Packages Class Hierarchy This Package Previous Next Index
Class sjl.Pair
java.lang.Object
|
+----sjl.Pair
- public class Pair
- extends Object
A Pair
object can contain two other heterogeneous objects.
They are used f.ex. by the Map container
for storing the key and the correspong value.
-
first
- The first element of the pair.
-
second
- The second element of the pair.
-
Pair(Object, Object)
- Construct a new
Pair
.
-
toString()
- Return a string representation of this pair.
first
public Object first
- The first element of the pair.
second
public Object second
- The second element of the pair.
Pair
public Pair(Object first,
Object second)
- Construct a new
Pair
.
- Parameters:
- first - The first element of the new pair.
- second - The second element of the new pair.
toString
public String toString()
- Return a string representation of this pair.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index